package com.sffzh.util.exception;

import com.sffzh.util.format.Message;


public abstract class SffzhException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String describe;
	private String name;
	private com.sffzh.util.format.Message returnMsg;//返回约定的标准JSON串，
	
	public SffzhException(String describe){
		super(describe);
		setDescribe(describe);
		this.returnMsg=Message.error(null, describe);
	}
	public String getDescribe() {
		return describe;
	}
	public void setDescribe(String describe) {
		this.describe = describe;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 快速根据Exception内容生成一个Error的标准Message用于向手机端返回错误信息，需要配合.toJson()方法转换为json字符串
	 * @return
	 */
	public Message getReturnMsg() {
		return returnMsg;
	}
	public void setReturnMsg(Message returnMsg) {
		this.returnMsg = returnMsg;
	}

}
